package localhost.prueba2pds.servicioSOA_php;

public class ServicioPortProxy implements localhost.prueba2pds.servicioSOA_php.ServicioPort {
  private String _endpoint = null;
  private localhost.prueba2pds.servicioSOA_php.ServicioPort servicioPort = null;
  
  public ServicioPortProxy() {
    _initServicioPortProxy();
  }
  
  public ServicioPortProxy(String endpoint) {
    _endpoint = endpoint;
    _initServicioPortProxy();
  }
  
  private void _initServicioPortProxy() {
    try {
      servicioPort = (new localhost.prueba2pds.servicioSOA_php.ServicioServiceLocator()).getservicioPort();
      if (servicioPort != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)servicioPort)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)servicioPort)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (servicioPort != null)
      ((javax.xml.rpc.Stub)servicioPort)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public localhost.prueba2pds.servicioSOA_php.ServicioPort getServicioPort() {
    if (servicioPort == null)
      _initServicioPortProxy();
    return servicioPort;
  }
  
  public java.lang.String registraUsuario(java.lang.String user, java.lang.String password) throws java.rmi.RemoteException{
    if (servicioPort == null)
      _initServicioPortProxy();
    return servicioPort.registraUsuario(user, password);
  }
  
  public java.lang.String login(java.lang.String user, java.lang.String password) throws java.rmi.RemoteException{
    if (servicioPort == null)
      _initServicioPortProxy();
    return servicioPort.login(user, password);
  }
  
  public boolean comprobarLogin(java.lang.String token) throws java.rmi.RemoteException{
    if (servicioPort == null)
      _initServicioPortProxy();
    return servicioPort.comprobarLogin(token);
  }
  
  public java.lang.String generarToken() throws java.rmi.RemoteException{
    if (servicioPort == null)
      _initServicioPortProxy();
    return servicioPort.generarToken();
  }
  
  public java.lang.String encriptar(java.lang.String entrada, java.lang.String accion, java.lang.String token) throws java.rmi.RemoteException{
    if (servicioPort == null)
      _initServicioPortProxy();
    return servicioPort.encriptar(entrada, accion, token);
  }
  
  public java.lang.String mostrarEncriptados(java.lang.String token) throws java.rmi.RemoteException{
    if (servicioPort == null)
      _initServicioPortProxy();
    return servicioPort.mostrarEncriptados(token);
  }
  
  public void encrypt(java.lang.Object string) throws java.rmi.RemoteException{
    if (servicioPort == null)
      _initServicioPortProxy();
    servicioPort.encrypt(string);
  }
  
  public void decrypt(java.lang.Object string) throws java.rmi.RemoteException{
    if (servicioPort == null)
      _initServicioPortProxy();
    servicioPort.decrypt(string);
  }
  
  
}